#define _CRT_SECURE_NO_WARNINGS 1
#include "Sort.h"
void testInsert()
{
	int a[] = { 9,1,2,5,7,4,8,6,3,5,1,2,3,5,1,8,3 };
	InsertSort(a, sizeof(a) / sizeof(a[0]));
	Printarry(a, sizeof(a) / sizeof(a[0]));
}
void testShell()
{
	int a[] = { 9,1,2,5,7,4,8,6,3,5,1,2,3,5,1,8,3 };
	ShellSort(a, sizeof(a) / sizeof(a[0]));
	Printarry(a, sizeof(a) / sizeof(a[0]));

}
void testBubble()
{
	int a[] = { 9,1,2,5,7,4,8,6,3,5,1,2,3,5,1,8,3 };
	BubbleSort(a, sizeof(a) / sizeof(a[0]));
	Printarry(a, sizeof(a) / sizeof(a[0]));

}
void testSelect()
{
	int a[] = { 9,1,2,5,7,4,8,6,3,5,1,2,3,5,1,8,3 };
	SelectSort(a, sizeof(a) / sizeof(a[0]));
	Printarry(a, sizeof(a) / sizeof(a[0]));

}
void testHeap()
{
	int a[] = { 9,1,2,5,7,4,8,6,3,5,1,2,3,5,1,8,3 };
	HeapSort(a, sizeof(a) / sizeof(a[0]));
	Printarry(a, sizeof(a) / sizeof(a[0]));

}
void testQuick()
{
	int a[] = { 9,1,2,5,7,4,8,6,3,5,1,2,3,5,1,8,3 };
	QuickSort2(a, 0,sizeof(a) / sizeof(int)-1);
	Printarry(a, sizeof(a) / sizeof(int));

}
void testM()
{
	int a[] = { 9,1,2,5,7,4,8,6,3,5,1,2,3,5,1,8,3 };
	MergeSort(a,sizeof(a) / sizeof(int));
	Printarry(a, sizeof(a) / sizeof(int));

}
void testM2()
{
	int a[] = { 9,1,2,5,7,4,8,6,3,5,1,2,3,5,1,8,3 };
	MergeSortNonR(a, sizeof(a) / sizeof(int));
	Printarry(a, sizeof(a) / sizeof(int));

}
int main()
{
	//testInsert();
	//testShell();
	//testBubble();
	//testSelect();
	//testHeap();
	//testQuick();
	testM2();
	return 0;
}